home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / ascto123.zip / ASCTO123.DOC next >
Text File  |  1993-12-10  |  26KB  |  586 lines

  1. INTRODUCTION
  2.  
  3. The ASCII To 1-2-3 File Translator program (ASCTO123.EXE) converts fixed
  4. field ASCII text files (such as flat file database files) into Lotus 1-2-3
  5. WK1 format. This program removes the need to use the Lotus /File Import and
  6. /Data Parse commands to import such files into Lotus 1-2-3, and overcomes
  7. several limitations associated with using those commands.
  8.  
  9. Using ASCTO123 you can import files with records of up to 32,000 characters
  10. in length.  With the /File Import command, you are limited to between 240
  11. and 512 characters, depending on what version of 1-2-3 or Symphony you are
  12. using.  Using ASCTO123, each field in your file is converted to a cell in
  13. Lotus 1-2-3, properly formatted according to it's data type (number, date,
  14. time or label).  Using the Lotus /File Import command converts each record
  15. of your file to a long label in a single cell in 1-2-3.  You must then use
  16. the /Data Parse command to split the long label into separate cells of the
  17. right data type.  There is very little support for directly converting date
  18. and time fields into 1-2-3 date and time values.
  19.  
  20. LIMITATIONS
  21.  
  22. This program has been extensively tested, but it is impossible to test all
  23. possible uses of the program, and errors in conversion can occur.  Please
  24. check your spreadsheet for accuracy after using this product.  In no event
  25. will Strider Software be liable for any damages, including loss of data,
  26. lost profits, or any other incidental or consequential damages arising from
  27. the use of this product.
  28.  
  29. LIMITED LICENSE
  30.  
  31. This software is distributed on a "shareware" basis.  It is not free
  32. software, or in the public domain.  You are granted a license to use this
  33. copy of ASCTO123 for a free 30 day evaluation period.  If you continue to
  34. use ASCTO123 after the evaluation period, you must send a registration fee
  35. of $25 to Strider Software to obtain a perpetual single-user license.  For
  36. your fee you will also be sent a diskette with the latest version of the
  37. program, and free upgrade to the next release when available.
  38.  
  39. You may give this program to others provided you follow these restrictions:
  40. The program file (ASCTO123.EXE) is not modified in any way, the
  41. documentation file is included (ASCTO123.DOC), and you disclose the legal
  42. requirement to register the software for use beyond the 30 day evaluation
  43. period.  This software program is owned by Strider Software and is licensed
  44. for use to registered licensees.  You may not sell the program, but you may
  45. charge a modest fee to distribute the program on diskettes or electronic
  46. bulletin boards.
  47.  
  48. ACKNOWLEDGMENTS
  49.  
  50. Lotus 1-2-3 is a registered trademark of Lotus Development Corporation.
  51.  
  52. USING ASCTO123
  53.  
  54. ASCTO123 is a command line program which is run from the DOS prompt.  It is
  55. suitable for use interactively or in a batch file.  For a full description
  56. of ASCTO123 command line arguments and optional switches, refer to the
  57. section entitled ASCTO123 REFERENCE.  The rest of this section gives a
  58. tutorial on the use of ASCTO123.
  59.  
  60. Assume you have an ASCII data file (SAMPLE1.DAT), which looks like this:
  61.  
  62. 05/11/6211:15:30AMHANLON    DAVID      10.50
  63. 01/06/6003:12:55PMVEITCH    HEATHER     8.75
  64.  
  65. This file has 5 fields: a birth date, birth time, surname, given name and
  66. weight (number).  To translate this file into Lotus 1-2-3 format you first
  67. create (using a text editor) an ASCII file (SAMPLE1.LYT) which describes
  68. the layout of the fields in SAMPLE1.DAT.  The layout file would look like
  69. this:
  70.  
  71. BIRTHD,8,Dd/m/y
  72. BIRTHT,10,Th:m:sAM
  73. SNAME,10,L
  74. GNAME,10,L
  75. WEIGHT,6,N2
  76.  
  77. Each line of the layout file describes one field from the input (SAMPLE1.DAT)
  78. file.
  79.  
  80. Let's look at the first line of the layout file.
  81.  
  82. BIRTHD,8,Dd/m/y
  83.  
  84. There are 3 items in this line, each item delimited with commas.  The first
  85. item is the field name, BIRTHD.  The second item, 8, is the number of
  86. characters for the BIRTHD date field.  The last item, Dd/m/y, describes
  87. the format of the field.  The first character, 'D', identifies this field as
  88. a date field.  The remaining characters, 'd/m/y', specify the location of
  89. the day, month and year within the field.
  90.  
  91. Now look at the second line of the layout file.
  92.  
  93. BIRTHT,10,Th:m:sAM
  94.  
  95. The first 2 items are the field name and field length, as before.  The last
  96. item, Th:m:sAM, describes the format of the field.  As with the date field,
  97. the first character, 'T', identifies this field as a time field.  The
  98. remaining characters, 'h:m:sAM', specify the location of the hour, minute
  99. and second values within the field, and whether an AM/PM indicator is
  100. present in the field.
  101.  
  102. Now, the third line of the layout file.
  103.  
  104. SNAME,10,L
  105.  
  106. The first 2 items are the field name and field length, as before.  The last
  107. item, 'L', identifies this field as a label, or alphanumeric field.
  108.  
  109. The fourth line of the layout file is similar to line three, so let's skip
  110. to the fifth line.
  111.  
  112. WEIGHT,6,N2
  113.  
  114. Again, the first 2 items are the field name and length.  The last item,
  115. 'N2', identifies this field as a numeric field with 2 decimal places.
  116.  
  117. We can now translate this file to 1-2-3 format as follows:
  118.  
  119. ASCTO123 SAMPLE1.DAT SAMPLE1.LYT
  120.  
  121. This creates a 1-2-3 file, SAMPLE1.WK1, which looks like this in Lotus 1-2-3:
  122.  
  123.     A        B        C        D        E
  124. 1    BIRTHD        BIRTHT        SNAME        GNAME        WEIGHT
  125. 2    05-Nov-62    11:15:30 AM    HANLON        DAVID        10.50
  126. 3    01-Jun-60    03:12:55 PM    VEITCH        HEATHER         8.75
  127.  
  128. Note that the first row of this spreadsheet contains the field names from
  129. the layout file.  The birth dates have been converted to Lotus 1-2-3 date
  130. values, and have been formatted in Lotus Date format 1.  The birth times
  131. have been converted to Lotus 1-2-3 time values, and have been formatted in
  132. Lotus Time format 1.  The surname and given names have been converted to
  133. left-aligned labels.  The weight field has been converted to a number,
  134. formatted as fixed with 2 decimal places.  Also note that the column widths
  135. have been adjusted to be wide enough to display the field values and titles.
  136.  
  137. MORE ON LABELS
  138.  
  139. There's not much to labels in Lotus 1-2-3.  What you see in the input
  140. (ASCII) file is what you see in the Lotus 1-2-3 file.  You can optionally
  141. choose to change the default alignment from left-aligned to either right or
  142. center-aligned, by using the command line switch /fl.  Use /flr for
  143. right-aligned labels, and /flc for center-aligned labels.  (Refer to the
  144. section 'ASCTO123 REFERENCE' for full details on available command line
  145. options).
  146.  
  147. For example, if we recreate the SAMPLE1.WK1 file as follows:
  148.  
  149. ASCTO123 SAMPLE1.DAT SAMPLE1.LYT /flc
  150.  
  151. then the surname and given names (and all the field titles) will be
  152. converted to center-aligned labels.
  153.  
  154. MORE ON NUMBERS
  155.  
  156. The weight field in our sample file contained explicit decimal points.  It
  157. is not uncommon, however, for such a field to be stored without the decimal
  158. point, as follows: (This is SAMPLE2.DAT)
  159.  
  160. 1962-11-0511:15AMHANLON    DAVID      1050
  161. 1960-06-0103:13PMVEITCH    HEATHER     875
  162.  
  163. In this file the decimal point is implied.  ASCTO123 knows to expect 2
  164. decimal places in this field, because the format descriptor is N2.
  165. ASCTO123 will therefore insert a decimal point in the right location for
  166. this field.  That is, 1050 will be converted to 10.50, and 875 will be
  167. converted to 8.75.
  168.  
  169. Numeric values are formatted as fixed by default.  You can change the
  170. default format for numbers by using the command line switch /fn as shown
  171. below:
  172.  
  173. Switch        Format
  174.  
  175. /fnf        Fixed
  176. /fnc        Currency
  177. /fnp        Puncuated (comma)
  178. /fns        Scientific
  179. /fn%        Percent
  180.  
  181. For example, to format numeric values as currency, we do as follows:
  182.  
  183. ASCTO123 SAMPLE2.DAT SAMPLE2.LYT /fnc
  184.  
  185. MORE ON DATE VALUES
  186.  
  187. Date values present a few problems when converting to Lotus 1-2-3.  That's
  188. because a date is actually three different pieces of data tied together; the
  189. day, month and year.  There is no standard way to specify these 3 pieces
  190. when you are describing a date, which causes most of the problems.  ASCTO123
  191. lets you describe the format of your date fields with a 'picture', using the
  192. symbols 'd' (for 2 digit day value), 'm' (for 2 digit month value), 'y' (for
  193. 2 digit year value) and 'yy' (for 4 digit year value).
  194.  
  195. For example, the date 'picture' m*d*yy tells ASCTO123 that your date field
  196. is 10 characters in length, and that the month starts in position 1, the day
  197. in position 4 and the (4 digit) year starts in position 7.  The day, month
  198. and year values are separated by asterisk (*) characters.
  199.  
  200. For example, suppose you had a file with a date field containing dates of
  201. the form 31-12-1993. You would describe this date field in the layout file
  202. as follows:
  203.  
  204. DATEFIELD,10,Dd-m-yy
  205.  
  206. Another common way to represent date values in a file is to omit the day
  207. value or the year value.  For example, you might have a file containing a
  208. list of your appointments for 1993.  Such a file might have a field for the
  209. date of each appointment, as follows (SAMPLE3.DAT)
  210.  
  211. 03/25Dentist     03:00PM
  212. 03/27Doctor      09:30AM
  213. 03/28Dinner      08:00PM
  214.  
  215. The year is not stored in the file, but is implied from the context.  i.e.
  216. 1993 appointments.  The date field would be described in the layout file
  217. (SAMPLE3.LYT) as follows
  218.  
  219. APPTDATE,5,Dm/d
  220.  
  221. When a date which is missing a year value is converted into Lotus, ASCTO123
  222. will, by default, use the current year to complete the date value.  You can
  223. specify a different year by using the command line switch /dy#, where # is
  224. an integer from 0 (representing 1900) to 199 (representing 2099).
  225.  
  226. If a date field contains only month and year values, then ASCTO123 will, by
  227. default, use a day value of 1 to complete the date value.  You can specify
  228. a different day to use by using the command line switch /dd#, where # is an
  229. integer from 1 to 28.
  230.  
  231. Another difficulty with dates occurs when there are only 2 digits for the
  232. year value.  For example, supposing you had a file with date values of the
  233. form
  234.  
  235. 31/12/00
  236.  
  237. Does this date represent 31-Dec-1900 or 31-Dec-2000?  By default, ASCTO123
  238. interprets such a date as 31-Dec-1900.  By using the command line switch
  239. /c#, where # is an integer from 0 to 99, you can modify this behaviour.
  240. For example, using the commmand line switch /c10 causes ASCTO123 to treat
  241. all dates with a 2 digit year value less than 10 as being in the 21st
  242. century, and not the 20th century.
  243.  
  244. For example, using the command line switch /c10, causes the date value
  245. 31/12/09 to be converted to 31-Dec-2009, while 31/12/10 is converted to
  246. 31-Dec-1910.
  247.  
  248. MORE ON TIME VALUES
  249.  
  250. Time values present the same problems as date values when converting to
  251. Lotus 1-2-3.  A time value is also composed of three different pieces of
  252. data, the hour, minute and second, as well as the optional AM/PM indicator.
  253. As with date values,  ASCTO123 lets you describe the format of your time
  254. fields with a 'picture', using the symbols 'h' (for 2 digit hour value),
  255. 'm' (for 2 digit minute value), 's' (for 2 digit second value) and 'AM' or
  256. 'PM' to indicate the presence of the AM/PM indicator.
  257.  
  258. For example, the time 'picture' h:m:s tells ASCTO123 that your time field
  259. is 8 characters in length, and that the hour starts in position 1, the
  260. minute in position 4 and the second starts in position 7.  There is no
  261. AM/PM indicator, meaning the time field is in 24 hour format.  i.e. 3:00PM
  262. would be represented by an hour value of 15 (12 + 3).  The hour, minute
  263. and second values are separated by colon (:) characters.
  264.  
  265. For example, suppose you had a file with a time field containing time values
  266. of the form 08:30:10PM. You would describe this time field in the layout
  267. file as follows:
  268.  
  269. TIMEFIELD,10,Th:m:sAM
  270.  
  271. Another common way to represent time values in a file is to omit the second
  272. value.  For example, you might have a file containing a list of your
  273. appointments for 1993.  Such a file might have a field for the time of each
  274. appointment, as follows (SAMPLE3.DAT)
  275.  
  276. 03/25Dentist     03:00PM
  277. 03/27Doctor      09:30AM
  278. 03/28Dinner      08:00PM
  279.  
  280. The second value is not stored in the file.  The time field would be
  281. described in the layout file (SAMPLE3.LYT) as follows
  282.  
  283. APPTTIME,7,Th:mAM
  284.  
  285. When a time which is missing a second value is converted into Lotus, ASCTO123
  286. will use 0 for the second value.  An option to specify a different default
  287. second value has not been included, because the author could not envision a
  288. need for it.  If you feel otherwise, please send me a note to that effect.
  289.  
  290. INVALID DATA
  291.  
  292. The default action for ASCTO123 when it encounters an invalid value in the
  293. input file is to continue execution.  An @ERR value is written to the cell
  294. containing the invalid data. This is appropriate in most cases since invalid
  295. data occurs quite frequently in typical data files. However, if the layout file
  296. has been incorrectly set up, (for instance, the length for one of the fields
  297. might be incorrect), ASCTO123 will likely create a WK1 file will mostly
  298. @ERR values. To avoid this, use the /et command line switch which will
  299. cause ASCTO123 to terminate execution on encountering an invalid data value.
  300. Once the layout file has been correctly specified you can run ASCTO123
  301. without the /et command line option to produce your final WK1 file.
  302.  
  303. If you have a file layout which specifies the starting and ending columns
  304. for each field of the input file, it can sometimes be difficult to properly set
  305. up the layout file as required by ASCTO123. Once you find that the layout
  306. file has not been set up properly, it can be frustrating and time consuming
  307. to find the incorrect entry. Typically, an error in the field length for one of the
  308. fields is the culprit. To assist you in locating errors such as this, ASCTO123
  309. can (optionally) create a layout file which specifies starting and ending column
  310. numbers for each field in the file. Use this file to compare with your existing
  311. layout file description to quickly find the incorrect field length value.
  312.  
  313. Use the /l command line switch to create a layout file which describes the
  314. starting and ending column numbers for each field. ASCTO123 will create this
  315. file in the current directory, and will have a (unique) name of the form TMP#.$$$.
  316. # is a digit from 1 to 65536, which guarantees that the name will be unique.
  317.  
  318. Remember to erase all files of the form TMP#.$$$ after you are finished setting
  319. up the layout file.
  320.  
  321. MORE OPTIONS
  322.  
  323. ASCTO123 gives you the ability to select which fields of your input file you
  324. would like to include in the translated 1-2-3 WK1 file, and also the ability
  325. to specify the order of the fields in the 1-2-3 file.  By default, all
  326. fields are included in the 1-2-3 file, in the order in which they occur in
  327. the input file.  You can change this by specifying 2 more items in the
  328. layout file.   Recall that we had 3 items for each field in the layout file:
  329. the field name, length, and a format descriptor for the field.  These are
  330. required items for every field in the input file.  The fourth and fifth items
  331. specify whether to include the field in the 1-2-3 file, and the numeric
  332. location (order) of the field in the 1-2-3 file, from left to right.
  333.  
  334. For example, recall the input file SAMPLE1.DAT
  335.  
  336. 05/11/6211:15:30AMHANLON    DAVID      10.50
  337. 01/06/6003:12:55PMVEITCH    HEATHER     8.75
  338.  
  339. Suppose we are interested in just the birth date and surname fields of this
  340. file, and that we really want to have a 1-2-3 file with surname and then
  341. birth date, in that order.  We can achieve this by setting up our layout
  342. file (SAMPLE1O.LYT) as follows:
  343.  
  344. BIRTHD,8,Dd/m/y,Y,2
  345. BIRTHT,10,Th:m:sAM,N
  346. SNAME,10,L,Y,1
  347. GNAME,10,L,N
  348. WEIGHT,6,N2,N
  349.  
  350. Notice that the fourth item in each line is either a 'Y' (to include the
  351. field), or a 'N' (to exclude the field).  For the BIRTHD and SNAME fields we
  352. also include a number as the fifth item, which specifies the order that these
  353. fields should occur in the 1-2-3 file.
  354.  
  355. Now run ASCTO123 as follows:
  356.  
  357. ASCTO123 SAMPLE1.DAT SAMPLE1O.LYT /wSAMPLE1O.WK1
  358.  
  359. to create SAMPLE1O.WK1 (note the /w command line switch so that we don't
  360. overwrite SAMPLE1.WK1), which will look like this:
  361.  
  362.       A           B
  363. 1      SNAME       BIRTHD
  364. 2      HANLON     05-Nov-62
  365. 3      VEITCH     01-Jun-60
  366.  
  367. ASCTO123 REFERENCE
  368.  
  369. The formal syntax for using ASCTO123 is:
  370.  
  371. ASCTO123 AsciiFile LayoutFile [/Option1 /Option2 ...]
  372.  
  373. Where,
  374.  
  375. AsciiFile is the name of the (ASCII) input file to be translated into WK1
  376. format, and LayoutFile is the name of the (ASCII) file which contains field
  377. descriptions for AsciiFile.
  378.  
  379. The available command line switches are listed below:
  380.  
  381. /c#, where # is an integer from 0 to 99.  Causes ASCTO123 to add 100 to year
  382. values in date fields which are less than #.  This is useful when your file
  383. has 2 digits for the year value, and low numbers (such as 0), should be
  384. interpreted as being in the 21st century instead of the early 20th century.
  385. By default, ASCTO123 will interpret a 2 digit year value of 0 as the year
  386. 1900.
  387.  
  388. /dd#, where # is an integer from 1 to 28.  Causes ASCTO123 to use # for the
  389. day value in date fields where only the month and year are specified in the
  390. layout file.  By default, ASCTO123 uses 1 for the day value.
  391.  
  392. /dy#, where # is an integer from 0 to 199.  Causes ASCTO123 to use # for the
  393. year value in date fields where only the day and month are specified in the
  394. layout file.  0 corresponds to the year 1900.  By default ASCTO123 uses the
  395. current year as specified by the computer's system clock.
  396.  
  397. /ex, where x is one of {n,t}.  Controls how ASCTO123 behaves when it
  398. encounters invalid data values in the input file.  'n' causes ASCTO123 to
  399. ignore invalid values and continue processing. 't' causes ASCTO123 to
  400. terminate processing the input file.  By default, ASCTO123 will continue
  401. processing when it encounters an invalid value in the input file and write
  402. an @ERR value to the WK1 file.
  403.  
  404. /fdx, where x is one of {1,2,3}.  Causes ASCTO123 to format date fields
  405. using Lotus date format 1, 2 or 3, resp.  By default, ASCTO123 will use
  406. Lotus date format 1 (dd-Mon-yy).  Lotus date format 2 is dd-Mon, while format
  407. 3 is Mon-yy.
  408.  
  409. /flx, where x is one of {l,r,c}.  Causes ASCTO123 to format labels as
  410. left-aligned, right-aligned or center-aligned.  By default, ASCTO123 will
  411. use left-alignment.
  412.  
  413. /fnx, where x is one of {f,c,p,s,%}.  Causes ASCTO123 to format numeric
  414. values as 'fixed', 'currency', 'punctuated' (comma), 'scientific' or
  415. 'percent', resp.  By default, ASCTO123 will use 'fixed' format for numeric
  416. values.
  417.  
  418. /ftx, where x is one of {1,2}.  Causes ASCTO123 to format time fields using
  419. Lotus time format 1 or 2, resp.  By default, ASCTO123 will use Lotus time
  420. format 1 (hh:mm:ss AM).  Format 2 is hh:mm AM.
  421.  
  422. /h, causes ASCTO123 to display a 'help' screen.  This is useful when you
  423. don't remember how to use the command line switches, and don't want to have
  424. to refer to the documentation.  You also get this screen by using /?, or by
  425. just typing ASCTO123 with no parameters.
  426.  
  427. /l, causes ASCTO123 to create a file (in the current directory, and with the
  428. name TMP#.$$$, where # is a digit from 1 to 65536) which contains the
  429. starting and ending column numbers for each field in the input file, based on
  430. the entries in the layout file provided. This can be useful in locating errors
  431. in the layout file when you are working from a description of the file in terms
  432. of starting and ending column numbers, and not field lengths as is required by
  433. ASCTO123. You should remember to erase all files of the form TMP#.$$$ after
  434. you are finished setting up for ASCTO123.
  435.  
  436. /tx, where x is one of {+,-}.  '+' causes ASCTO123 to include a row in the
  437. 1-2-3 file, containing the field names from the layout file.  This provides
  438. an instant 'database' in your 1-2-3 file.  '-' prevents ASCTO123 from
  439. creating this row of column headings in the 1-2-3 file.  By default,
  440. ASCTO123 will create the row of column headings.
  441.  
  442. /vx, where x is one of {+,-}.  '+' causes ASCTO123 to display status and
  443. error messages on the screen while it is running.  '-' disables all messages
  444. to the screen (even error messages).  By default, ASCTO123 will display
  445. status and error messages on the screen.  You should only disable this if
  446. you are running ASCTO123 from a batch file, and only then if you are
  447. checking the DOS Errorlevel variable after invoking ASCTO123 to detect
  448. errors.
  449.  
  450. /wWK1File, specifies WK1File as the name of the 1-2-3 file that should be
  451. created.  By default, ASCTO123 will use the same name as the input file,
  452. with a WK1 extension.  ASCTO123 will always use a WK1 extension, no matter
  453. what is specified using this option.
  454.  
  455. DOS ErrorLevel
  456.  
  457. On exit, ASCTO123 will set the DOS ErrorLevel variable as follows:
  458.  
  459. 0 - Successful completion
  460. 250 - Invalid data error
  461. 251 - User cancellation of processing
  462. 252 - Invalid layout file or field descriptor
  463. 253 - Insufficient memory error
  464. 254 - File i/o error or insufficient handles
  465. 255 - Invalid command line syntax error
  466.  
  467. If you are invoking ASCTO123 from a batch file, you should test the
  468. ErrorLevel variable for a value of 250 or more, and take appropriate action.
  469.  
  470. USER CANCELLATION
  471.  
  472. Once ASCTO123 starts writing the 1-2-3 file, it can be interrupted simply by
  473. pressing a key.  You will be prompted whether to cancel processing or
  474. continue.  This feature is sometimes useful if you are translating a very
  475. large file into 1-2-3 format.  This is only available if you have not
  476. disabled messages to the screen using the /v- command line switch.  In this
  477. case you can use the Ctrl-brk key combination to interrupt the program.
  478.  
  479. LAYOUT FILE DESCRIPTION
  480.  
  481. The layout file is a text file which describes the length and format of all
  482. fields within the ASCII text file which is to be converted to WK1 format.
  483. Each line of the layout file consists of (up to) 5 descriptors which describe
  484. the format of a single field.  The first 3 descriptors are required, the last
  485. 2 are optional.  Each line of the layout file looks like:
  486.  
  487. FieldName,FieldLength,FieldFormat,IncludeField,FieldOrder
  488.  
  489. where,
  490.  
  491. FieldName is just a label describing the contents of the field, for example,
  492. BirthDate for a field containing birth dates.  The FieldName labels are
  493. written to the first row of the WK1 file to serve as titles.  The FieldName
  494. is a required item.
  495.  
  496. FieldLength is the length of the field in the input (ASCII) file.
  497. FieldLength cannot exceed 240 for labels (as this is the maximum length of a
  498. label in 1-2-3 v2.0).  If you have a large section of your file which will
  499. not be included in the WK1 file, you may have to split it into 2 or more
  500. separate fields, each of which is less that 240 characters in length, in
  501. order to get ASCTO123 to process it.  The FieldLength is a required item.
  502.  
  503. FieldFormat is a string which describes the format, or data type, of the
  504. field.  The string may be one of the following:
  505.  
  506. FieldFormat String    Data Type                1-2-3 Format
  507.  
  508. L            Label, or alphanumeric string        Label
  509. N#            Number, with (optional) # decimal    Number
  510.             places (implied or explicit)
  511. Dpicture        Date, with 'picture' defining the    Date
  512.             position of the day, month and
  513.             year within the field.  See below.
  514. Tpicture        Time, with 'picture' defining the    Time
  515.             position of the hour, minute and
  516.             second within the field.  'AM' or
  517.             'PM' indicates the presence of the
  518.             AM/PM in the field.  Otherwise, time
  519.             values are interpreted in 24 hour
  520.             format.
  521.  
  522. The FieldFormat is a required item.
  523.  
  524. IncludeField is either 'Y' (to include the field in the WK1 file), or 'N' to
  525. exclude it.  Each field is included in the WK1 file by default.  Therefore,
  526. the IncludeField is an optional item.
  527.  
  528. FieldOrder is an integer identifying the field order (from left to right)
  529. that the field should occupy in the WK1 file.  By default, fields are written
  530. to the WK1 file in the same order that they occur in the input file.
  531. Therefore, this is an optional field.  You can use this item to re-order the
  532. fields in the WK1 file.  If this item is used for one (included) field, then
  533. it must be used for every (included) field.  Note that you must specify the
  534. IncludeField item in order to specify the FieldOrder item.
  535.  
  536. 'PICTURE STRINGS' FOR DATE FIELDS
  537.  
  538. The picture string for a date field specifies the position of the day, month
  539. and year fields, if present, within the date field, as well as any other
  540. special formatting characters that appear within the date field, such as
  541. slash or hyphen characters.  The characters 'd', 'm', 'y' and 'yy' are used
  542. to specify the locations of the 2-digit day, 2-digit month, 2-digit year and
  543. 4-digit year values within the date field.  For example, a (10 character)
  544. date field containing dates of the form
  545.  
  546. 1993-02-28
  547.  
  548. would have the following picture string:
  549.  
  550. Dyy-m-d
  551.  
  552. while a (5 character) date field with dates of the form
  553.  
  554. 31/01
  555.  
  556. would have a picture string that looked like:
  557.  
  558. Dd/m
  559.  
  560. 'PICTURE STRINGS' FOR TIME FIELDS
  561.  
  562. The picture string for a time field specifies the position of the hour,
  563. minute and second values, if present, within the time field, as well as any
  564. other special formatting characters that appear within the time field, such
  565. as colon or hyphen characters.  The characters 'h', 'm', 's' are used to
  566. specify the locations of the 2-digit hour, 2-digit minute and 2-digit second
  567. values within the time field.  'AM' or 'PM' can be placed in the picture
  568. string to indicate the presence of AM/PM within the time field.  If not
  569. present, time values are interpreted in 24 hour format.  For example, the
  570. hour value of 15 would be interpreted as 3:00PM.
  571.  
  572. For example, a (8 character) time field containing time values of the form
  573.  
  574. 21:10:30
  575.  
  576. would have the following picture string:
  577.  
  578. Th:m:s
  579.  
  580. while a (7 character) time field with time values of the form
  581.  
  582. 08:30AM
  583.  
  584. would have a picture string that looked like:
  585.  
  586. Th:mAM